<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07_DOM操作2</title>
</head>
<body>
<input type="text" id="i1"><br>
<input type="text" id="i2">
<button onclick="f()">按钮</button>
<hr>
<button onclick="f1()">按钮1</button>
我是标题：<span id="ss"></span>
<hr>
<script>
    function f1(){
        //获取span标签
        //通过文档标签
        var spanE = document.querySelector('span');

        //通过id获取标签
        var byId0=document.querySelector('#id')
        var byId = document.getElementById('ss');
        spanE.innerHTML='你好';

    }
    function f(){
        console.log(i1.value,i2.value)
        let a= parseFloat(i1.value);
        console.log(a,typeof a)
    }
</script>
</body>
</html>